<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center newDetails_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }"
				v-if=" appSystemIdentification!='Wechat'">
				<view class='flex flex-wrap align-center justify-between flex-sub newDetails_fd0_0'>
					<view class='flex flex-wrap align-center newDetails_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  newDetails_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='newDetails_fd0_0_c1'>消息详情</text>
					<view class='flex flex-wrap align-center newDetails_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}" v-if=" appSystemIdentification!='Wechat'"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction align-stretch newDetails_flex_1">
				<text class='newDetails_fd1_0'>{{detailsData.title}}</text>
				<text class='newDetails_fd1_1'>{{detailsData.create_time}}</text>
			</view>

			<!---flex布局flex布局结束-->
			<view class="ben_fu-jyf-parser_2">
				<jyf-parser :html="detailsData.content | richTextFormat"></jyf-parser>
			</view>


		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},


		data() {
			return {
				"detailsData": {
					"aid": "",
					"title": "",
					"content": "",
					"create_time": ""
				},
				"id": ""
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},
			/**
			 * @returns 
			 * Android       安卓
			 * IOS       苹果
			 * Web       H5 或 pc
			 * Wechat       微信小程序
			 * Alipay       支付宝小程序
			 * Baidu       百度小程序
			 * ByteBounce       抖音小程序
			 * 360       360小程序
			 * FastApp       快应用
			 */
			appSystemIdentification() {
				return this.$store.state.appSystemIdentification
			}
		},
		watch: {},
		onLoad(options) {
			let {
				id
			} = options
			if (id !== undefined) this.id = id
			this.getDetailsFunc()
			uni.showShareMenu({
				withShareTicket: true,
				//设置下方的Menus菜单，才能够让发送给朋友与分享到朋友圈两个按钮可以点击
				menus: ["shareAppMessage", "shareTimeline"]
			})
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onShareAppMessage() {
			return {
				title: '高整无忧-数字家政平台',
				path: `/pages/index/newDetails/newDetails?id=${item.id}`
			}
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取消息详情信息
			async getDetailsFunc() {
				//请求方法
				//数据验证

				let datadetailsData = await this.$api.get(global.apiUrls.post63a6b8529a9b8, {
					aid: this.id
				});

				if (datadetailsData.data.code != 1) {
					this.$message.info(datadetailsData.data.msg);
					return
				}
				let infodetailsData = datadetailsData.data;
				this.detailsData = infodetailsData.data

			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.newDetails_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.newDetails_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.newDetails_fd0_0_c0_c0 {
		font-size: 32rpx;
		color: #333;
	}

	.newDetails_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.newDetails_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.newDetails_flex_1 {
		padding: 40rpx 32rpx 0rpx 32rpx;
	}

	.newDetails_fd1_1 {
		color: #999999;
		font-size: 24rpx;
		line-height: 33rpx;
		font-weight: 400;
		margin: 24rpx 0rpx 32rpx 0rpx;
	}

	.newDetails_fd1_0 {
		font-size: 40rpx;
		line-height: 56rpx;
		font-weight: 700;
		color: #333333;
	}

	.ben_fu-jyf-parser_2 {
		background-color: #fff;
		padding-left: 32rpx;
		padding-right: 32rpx;
		padding-top: 0rpx;
		padding-bottom: 0rpx;

	}
</style>